//
//  Contact.m
//  HomeworkOfAddressBook
//
//  Created by Scott on 16/4/28.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "Contact.h"

@implementation Contact


- (void)info {
    
    NSLog(@"name:%@, phoneNumber:%@", self.name, self.phoneNumber);
    
}

+ (instancetype)contactWithName:(NSString *)name phoneNumber:(NSString *)phoneNumber {
    
    Contact *con = [[Contact alloc] init];
    con.name = name;
    con.phoneNumber = phoneNumber;
    con.group = [[name substringToIndex:1] uppercaseString];
    
    return con;
}





@end
